//
//  GHOrderTableViewCell.m
//  GodHorses
//
//  Created by Mac on 2017/11/17.
//  Copyright © 2017年 stoneobs@icloud.com. All rights reserved.
//

#import "KLOrderTableViewCell.h"
@interface KLOrderTableViewCell ()

@property(nonatomic, strong) UIImageView                     *goodBanerImageView;
@property(nonatomic, strong) STLabel                         *titleLable;//名字
@property(nonatomic, strong) STLabel                         *nameLable;//种类


@end
@implementation KLOrderTableViewCell

+ (CGFloat)CellHeight{
    return 120;
}
- (instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier{
    if (self == [super initWithStyle:style reuseIdentifier:reuseIdentifier]) {
        [self configSubView];
    }
    return self;
}
#pragma mark --subView
- (void)configSubView{
    self.backgroundColor = [UIColor whiteColor];
    
    //商品
    UIView * grayView = [[UIView alloc] initWithFrame:CGRectMake(0, 0, UIScreenWidth, 120)];
    grayView.backgroundColor  = UIColorFromRGBA(0xf2f2f2);
    [self addSubview:grayView];
    
    self.goodBanerImageView = [[UIImageView alloc] initWithFrame:CGRectMake(10, 10, 90, 90)];
    self.goodBanerImageView.image = [UIImage imageNamed:@"06"];
    [grayView addSubview:self.goodBanerImageView];
    
    self.titleLable = [[STLabel alloc] initWithFrame:CGRectMake(self.goodBanerImageView.right + 10, self.goodBanerImageView.top + 5, UIScreenWidth - 20 - self.goodBanerImageView.right, 35)
                                                text:@"鲜榨大橘子打开了手机读卡老实交代安达市打"
                                           textColor:KL_firstTextColor
                                                font:14
                                         isSizetoFit:NO
                                       textAlignment:NSTextAlignmentLeft];
    self.titleLable.numberOfLines = 0;
    [grayView addSubview:self.titleLable];
    
    self.nameLable = [[STLabel alloc] initWithFrame:CGRectMake(self.goodBanerImageView.right + 10, self.titleLable.st_bottom + 5, UIScreenWidth - 20 - self.goodBanerImageView.right, 15)
                                               text:@"规格：10斤装"
                                          textColor:KL_secendTextColor
                                               font:13
                                        isSizetoFit:NO
                                      textAlignment:NSTextAlignmentLeft];
    [grayView addSubview:self.nameLable];
    
    self.moneyLable = [[STLabel alloc] initWithFrame:CGRectMake(self.goodBanerImageView.right + 10, self.titleLable.st_bottom , UIScreenWidth - 20 - self.goodBanerImageView.right, 16)
                                                text:@"￥1374"
                                           textColor:KL_redColor
                                                font:15
                                         isSizetoFit:NO
                                       textAlignment:NSTextAlignmentRight];
    self.moneyLable.st_right = UIScreenWidth - 10;
    [grayView addSubview:self.moneyLable];
    
}
//- (void)setModel:(GHOrderGoodModel *)model{
//    _model = model;
//    [self.goodBanerImageView sd_setImageWithURL:[NSURL URLWithString:model.g_img] placeholderImage:GH_placeHoderImage];
//    
//    self.titleLable.text = [NSString stringWithFormat:@"%@ *%@",model.g_name,model.g_num];
//    
//    self.nameLable.text = @"";
//    
//    self.moneyLable.text = [NSString stringWithFormat:@"￥%@",model.total_price];
//}
- (void)setModel:(BLGoodModel *)model{
    _model = model;
//    [self.goodBanerImageView sd_setImageWithURL:[NSURL URLWithString:model.img_url] placeholderImage:nil];
//    
//    self.titleLable.text = model.name;
//    
//    self.moneyLable.text = [NSString stringWithFormat:@"会员价格:￥%@",model.price];
//    
//    self.nameLable.text = [NSString stringWithFormat:@"数量:*%@",model.num];
    

    
}
@end

